package com.iacrqq.sedaf.queue;

import java.util.List;

/**
 * 
 * Queue's input
 * 
 * @author sihai
 *
 */
public interface Input<T> {
	
	/**
	 * Dequeues the next element, or returns <code>null</code> if there is
     * nothing left on the queue.
     * 
	 * @return the next <code>QueueElementIF</code> on the queue
	 */
	T dequeue();

	/**
	 * 
	 * @param timeOut
	 * @return
	 */
	T blockingDequeue(long timeout);
	
	/**
	 * 
	 * @return
	 */
	T blockingDequeue();
	
	/**
	 * Dequeues at most <code>num</code> available elements, or returns 
	 * empty list if there is nothing left on the queue.
	 * @param num
	 * @return
	 */
	List<T> dequeue(int num);
	
	/**
	 * Dequeues all available elements, or returns empty list if there is
	 * nothing left on the queue
	 * @return
	 */
	List<T> dequeueAll();
}
